package com.mobor.moborsvr.obj.category.dao;

import java.util.List;

import org.hibernate.SessionFactory;

import com.mobor.moborsvr.infra.dao.BaseWorker;
import com.mobor.moborsvr.obj.category.categories.CategoryObjectDO;

/**
 * Interface providing access to object categories. 
 * @author teroleg
 *
 */
public interface CategoryObjectDao extends BaseWorker{

	/**
	 * Sets session factory for database access
	 * @param sessionFactory Hibernate session factory
	 */
	public abstract void setSessionFactory(SessionFactory sessionFactory);	
	/**
	 * Searches for all object categories which are existing in the system. According type: {@link CategoryObjectDO}.
	 * @return list of found object categories
	 */
	public abstract List<CategoryObjectDO> getCategoryObjects();
	/**
	 * Search for object category having provided id value.
	 * @param coId id of the category to search 
	 * @return list with single object category with required id
	 */
	public abstract List<CategoryObjectDO> getObjectCategory(Long coId);
	/**
	 * Get current object category
	 * @return long or null
	 */
	public Long getCoId();
	/**
	 * Set current object category id. Side effect: search by id will be executed
	 * @param coId
	 */
	public void setCoId(Long coId);

}